<?php
/**
* @package Scribble
*/
use Buan\Config;
use Buan\UrlCommand;
?>

<div class="head">
	<h1>Upgrade Scribble</h1>
	<h2>Step 1: Compatability checks</h2>
</div>

<table class="list">
	<thead>
		<tr>
			<th>Plugin</th>
			<th>Compatibility</th>
		</tr>
	</thead>
	<tbody>
	<?php foreach($results as $r): ?>
		<tr>
			<td><?php $this->html->e($r->pluginName); ?></td>
			<td>
				<?php if($r->isCompatible): ?>
					YES
				<?php else: ?>
					NO<br/>
					Visit the <a href="<?php $this->html->e($r->infoUrl); ?>" rel="external">plugin homepage</a> for a guide to upgrading
				<?php endif; ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</tbody>
</table>

<div class="hr"><hr/></div>
<?php if($showProceedWarning): ?>
	<p class="warning">
		Some of the plugins are not compatible with the version of Scribble you're about to upgrade to. If you proceed now without first upgrading each incompatible  plugin then you run the risk of breaking the site somehow. <strong>Proceed only if you know what you're doing</strong>
	</p>
<?php endif; ?>
<form method="post" action="<?php $this->html->eUrl(UrlCommand::createUrl('scribble', 'upgrade', 'step-2')); ?>">
	<button class="submit" type="submit">Proceed to step #2</button>
</form>